<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理员登录</title>
    <link rel="stylesheet" href="../../static/css/me.css" th:href="@{/css/me.css}">
    <link rel="stylesheet" href="https://unpkg.com/semantic-ui@2.4.2/dist/semantic.min.css">
</head>
<body>
<br>
<br>
<br>
<br>
<div class="m-container-small m-padded-tb-massive" style="max-width: 30em !important;">
    <div class="ui container">
        <div class="ui middle aligned center aligned grid">
            <div class="column">
                <h2 class="ui teal image header">
                    <div class="content">
                        Social Rescue Forces Sys. Admin Page
                    </div>
                </h2>
                <form class="ui large form" method="post" action="#" th:action="@{/admin/login}">
                    <div class="ui segment">
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="user icon"></i>
                                <input type="text" name="username" placeholder="Username">
                            </div>
                        </div>
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="lock icon"></i>
                                <input type="password" name="password" placeholder="Password">
                            </div>
                        </div>
                        <button class="ui fluid large teal submit button">Login</button>
                    </div>

                    <div class="ui error mini message" ></div>
                    <div class="ui negative message" th:unless="${#strings.isEmpty(msg)}">
                        <i class="close icon"></i>
                        <div class="header">验证失败：</div>
                        <p th:text="${msg}">对不起，操作失败！</p>
                    </div>
                </form>

            </div>
        </div>
    </div>
</div>




<script src="https://unpkg.com/jquery@3.5.1/dist/jquery.min.js"></script>
<script src="https://unpkg.com/semantic-ui@2.4.2/dist/semantic.min.js"></script>

<script>
    $('.ui.form').form({
        fields : {
            username : {
                identifier : 'username',
                rules : [{
                    type : 'empty',
                    prompt : '请输入用户名'
                }]
            },
            password : {
                identifier : 'password',
                rules : [{
                    type : 'empty',
                    prompt : '请输入密码'
                }]
            }
        }
    });

</script>
</body>
</html>